﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nvigorate.Common;

namespace Nvigorate.TestObjects
{
    public class GrandparentTarget
    {
        internal string _level3InternalString;
        internal int _level3InternalInteger;

        protected DateTime _level3ProtectedDateTime;
        protected bool _level3ProtectedBoolean;

        private decimal _level3PrivateDecimal;
        private float _level3PrivateFloat;

        private string _level3Property;

        public string Level3Property
        {
            get { return _level3Property; }
            set { _level3Property = value; }
        }

        internal T Level3GenericInternalCall<T>(T value)
        {
            return value;
        }

        internal string Level3NonGenericInternalCall(string arg1, int arg2, decimal arg3)
        {
            return "call 1";
        }

        internal string Level3NonGenericInternalCall(bool arg1, int arg2, decimal arg3)
        {
            return "call 2";
        }

        protected T Level3GenericProtectedCall<T>(T value)
        {
            return value;
        }

        protected string Level3NonGenericProtectedCall(string arg1, int arg2, decimal arg3)
        {
            return "call 1";
        }

        protected string Level3NonGenericProtectedCall(bool arg1, int arg2, decimal arg3)
        {
            return "call 2";
        }

        private T Level3GenericPrivateCall<T>(T value)
        {
            return value;
        }

        private string Level3NonGenericPrivateCall(string arg1, int arg2, decimal arg3)
        {
            return "call 1";
        }

        private string Level3NonGenericPrivateCall(bool arg1, int arg2, decimal arg3)
        {
            return "call 2";
        }
    }

    public class ParentTarget : GrandparentTarget
    {
        internal string _level2InternalString;
        internal int _level2InternalInteger;

        protected DateTime _level2ProtectedDateTime;
        protected bool _level2ProtectedBoolean;

        private decimal _level2PrivateDecimal;
        private float _level2PrivateFloat;

        private string _level2Property;

        public string Level2Property
        {
            get { return _level2Property; }
            set { _level2Property = value; }
        }

        private static string Level2PrivateStatic(string arg)
        {
            return arg;
        }

        internal static Tuple<string, int> Level2InternalStatic(string arg1, int arg2)
        {
            return Tuple.Create(arg1, arg2);
        }

        public static Tuple<string, bool, DateTime> Level2PublicStatic(string arg1, bool arg2, DateTime arg3)
        {
            return Tuple.Create(arg1, arg2, arg3);
        }

        public static Tuple<string, float> Level2PublicStatic(string arg1, float arg2)
        {
            return Tuple.Create(arg1, arg2);
        }
    }

    public class Target : ParentTarget
    {
        internal string _levelInternalString;
        internal int _levelInternalInteger;

        protected DateTime _levelProtectedDateTime;
        protected bool _levelProtectedBoolean;

        private decimal _levelPrivateDecimal;
        private float _levelPrivateFloat;

        private string _levelProperty;

        public string LevelProperty
        {
            get { return _levelProperty; }
            set { _levelProperty = value; }
        }

        public T GenericCall<T>(T value)
        {
            return value;
        }

        public string NonGenericCall1(string arg1, int arg2, decimal arg3)
        {
            return "call 1";
        }

        public string NonGenericCall2(bool arg1, int arg2, decimal arg3)
        {
            return "call 2";
        }

        public void NoArgsCall()
        {
        }

        public string OneArgCall(string arg)
        {
            return "call 1";
        }

        public string OneArgCall(int arg)
        {
            return "call 2";
        }
    }
}
